<template>
	<view class="aialog_box">
		<uni-popup class="popups_center" ref="popups" type="bottom" background-color="#fff">
			<view class="popup_boxs">
				<view class="header_box">
					<view class="left_text" @click="leftBtn">
						{{ btnText.lesftName }}
					</view>
					<view class="">
						{{ titleTxt }}
					</view>
					<view class="ty_btn" @click="rightBtn">
						{{ btnText.rightName }}
					</view>
				</view>
				
				<view class="bgc_box"></view>
				
				<view class="popups_center">
					<slot></slot>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		props: {
			btnText: {
				type: Object,
				default: () => {
					return {
						lesftName: '不同意',
						rightName: '同意',
					}
				},
			},
			titleTxt: {
				type: String,
				default: () => '审核加入申请'
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			open() {
				this.$refs.popups.open()
			},
			
			leftBtn() {
				this.$emit('leftBtn')
			},
			
			rightBtn() {
				this.$emit('rightBtn')
			},
			
			close() {
				this.$refs.popups.close()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.aialog_box {
		background-color: #fff;
	}
	
	::v-deep .uni-transition[data-v-cce16df8] {
		background-color: #fff;
	}
	.header_box {
		height: 100rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 20rpx;
		background-color: #fff;
		
		.left_text {
			color: #0052d9;
		}
		
		.ty_btn {
			color: #fff;
			padding: 6rpx 12rpx;
			background-color: #0052d9;
			border-radius: 4rpx;
		}
	}
	
	.bgc_box {
		width: 100%;
		height: 20rpx;
		background-color: #fafafa;
	}
	
	.popup_boxs {
		width: 100%;
		height: 100%;
		background-color: #fff !important;
	}
	
</style>